package doublelinkedlist;

public class DuobleLinkedList<E> {
	public class Node<E>{
		private E data;
		private Node<E> pre,next;
		public Node(E d){
			this.data=d;
			pre=next=null;
		}
	
		public Node(E d,Node<E> p,Node<E> n){
			this.data=d;
			this.next=n;
			this.pre=p;
		}
	}
		private Node<E> head,tail;
		private int size;
		public void DoubleLinkedList(){
			head=null;
			tail=null;
			size=0;
		}
		public int Size(){
			return size;
		}
		public void AddFirst(E element){
			Node<E> p=new Node<E>(element,null,null);
			if(size==0) tail=p;
			else
			{	head.pre=p;
			    
			}
			p=head;
			size++;
		}
		public void AddLast(E element){
			Node<E> p=new Node<E>(element,null,null);
			
		}
	
	
}
	